//
//  RetakeScreen.m
//  Gekko
//
//  Created by jose on 02/06/13.
//  Copyright (c) 2013 Jose Luis Lopez. All rights reserved.
//

#import "RetakeScreen.h"

@interface RetakeScreen ()

@end

@implementation RetakeScreen

@synthesize image, imageCaptured, buttonRetake, buttonUseThis;

- (void)viewDidLoad
{
    [super viewDidLoad];

    imageCaptured.image = image;
    imageCaptured.contentMode = UIViewContentModeScaleAspectFit;
    
    [buttonUseThis setTitle:NSLocalizedString(@"USE THIS", nil) forState:UIControlStateNormal];
    [buttonUseThis.titleLabel setFont:[UIFont fontWithName:kFontBold size:16]];
    
    [buttonRetake setTitle:NSLocalizedString(@"RETAKE", nil) forState:UIControlStateNormal];
    [buttonRetake.titleLabel setFont:[UIFont fontWithName:kFontBold size:16]];
}

- (IBAction)useThisPressed:(UIButton *)sender {
    
    [Receipt sharedReceipt].image = imageCaptured.image;
    [self performSegueWithIdentifier:@"PushToDetails" sender:self];
}

- (IBAction)retakePressed:(UIButton *)sender {
    
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)viewDidUnload {
    [self setButtonUseThis:nil];
    [self setButtonRetake:nil];
    [super viewDidUnload];
}
@end
